<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DfpMath (Apache Commons Math 3.6.1 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="DfpMath (Apache Commons Math 3.6.1 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DfpMath.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/dfp/DfpField.RoundingMode.html" title="enum in org.apache.commons.math3.dfp"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/dfp/UnivariateDfpFunction.html" title="interface in org.apache.commons.math3.dfp"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/dfp/DfpMath.html" target="_top">Frames</a></li>
<li><a href="DfpMath.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.dfp</div>
<h2 title="Class DfpMath" class="title">Class DfpMath</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.dfp.DfpMath</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">DfpMath</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Mathematical routines for use with <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a>.
 The constants are defined in <a href="../../../../../org/apache/commons/math3/dfp/DfpField.html" title="class in org.apache.commons.math3.dfp"><code>DfpField</code></a></div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#acos(org.apache.commons.math3.dfp.Dfp)">acos</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the arc-cosine of the argument.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#asin(org.apache.commons.math3.dfp.Dfp)">asin</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the arc-sine of the argument.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#atan(org.apache.commons.math3.dfp.Dfp)">atan</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the arc tangent of the argument

  Uses the typical taylor series

  but may reduce arguments using the following identity
 tan(x+y) = (tan(x) + tan(y)) / (1 - tan(x)*tan(y))

 since tan(PI/8) = sqrt(2)-1,

 atan(x) = atan( (x - sqrt(2) + 1) / (1+x*sqrt(2) - x) + PI/8.0</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#atanInternal(org.apache.commons.math3.dfp.Dfp)">atanInternal</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the arc-tangent of the argument.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#cos(org.apache.commons.math3.dfp.Dfp)">cos</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the cosine of the argument.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#cosInternal(org.apache.commons.math3.dfp.Dfp[])">cosInternal</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a)</code>
<div class="block">Computes cos(a)  Used when 0 < a < pi/4.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#exp(org.apache.commons.math3.dfp.Dfp)">exp</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">Computes e to the given power.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#expInternal(org.apache.commons.math3.dfp.Dfp)">expInternal</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">Computes e to the given power.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#log(org.apache.commons.math3.dfp.Dfp)">log</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">Returns the natural logarithm of a.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#logInternal(org.apache.commons.math3.dfp.Dfp[])">logInternal</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a)</code>
<div class="block">Computes the natural log of a number between 0 and 2.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#pow(org.apache.commons.math3.dfp.Dfp,%20org.apache.commons.math3.dfp.Dfp)">pow</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;x,
   <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;y)</code>
<div class="block">Computes x to the y power.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#pow(org.apache.commons.math3.dfp.Dfp,%20int)">pow</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;base,
   int&nbsp;a)</code>
<div class="block">Raises base to the power a by successive squaring.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#sin(org.apache.commons.math3.dfp.Dfp)">sin</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the sine of the argument.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#sinInternal(org.apache.commons.math3.dfp.Dfp[])">sinInternal</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a)</code>
<div class="block">Computes sin(a)  Used when 0 < a < pi/4.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#split(org.apache.commons.math3.dfp.Dfp)">split</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">Splits a <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a> into 2 <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a>'s such that their sum is equal to the input <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#split(org.apache.commons.math3.dfp.DfpField,%20java.lang.String)">split</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/DfpField.html" title="class in org.apache.commons.math3.dfp">DfpField</a>&nbsp;field,
     <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;a)</code>
<div class="block">Breaks a string representation up into two dfp's.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#splitDiv(org.apache.commons.math3.dfp.Dfp[],%20org.apache.commons.math3.dfp.Dfp[])">splitDiv</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a,
        <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;b)</code>
<div class="block">Divide two numbers that are split in to two pieces that are meant to be added together.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#splitMult(org.apache.commons.math3.dfp.Dfp[],%20org.apache.commons.math3.dfp.Dfp[])">splitMult</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a,
         <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;b)</code>
<div class="block">Multiply two numbers that are split in to two pieces that are
  meant to be added together.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#splitPow(org.apache.commons.math3.dfp.Dfp[],%20int)">splitPow</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;base,
        int&nbsp;a)</code>
<div class="block">Raise a split base to the a power.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/dfp/DfpMath.html#tan(org.apache.commons.math3.dfp.Dfp)">tan</a></strong>(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</code>
<div class="block">computes the tangent of the argument.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="split(org.apache.commons.math3.dfp.DfpField, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;split(<a href="../../../../../org/apache/commons/math3/dfp/DfpField.html" title="class in org.apache.commons.math3.dfp">DfpField</a>&nbsp;field,
          <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;a)</pre>
<div class="block">Breaks a string representation up into two dfp's.
 <p>The two dfp are such that the sum of them is equivalent
 to the input string, but has higher precision than using a
 single dfp. This is useful for improving accuracy of
 exponentiation and critical multiplies.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>field</code> - field to which the Dfp must belong</dd><dd><code>a</code> - string representation to split</dd>
<dt><span class="strong">Returns:</span></dt><dd>an array of two <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a> which sum is a</dd></dl>
</li>
</ul>
<a name="split(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;split(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">Splits a <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a> into 2 <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a>'s such that their sum is equal to the input <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp"><code>Dfp</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number to split</dd>
<dt><span class="strong">Returns:</span></dt><dd>two elements array containing the split number</dd></dl>
</li>
</ul>
<a name="splitMult(org.apache.commons.math3.dfp.Dfp[], org.apache.commons.math3.dfp.Dfp[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>splitMult</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;splitMult(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a,
              <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;b)</pre>
<div class="block">Multiply two numbers that are split in to two pieces that are
  meant to be added together.
  Use binomial multiplication so ab = a0 b0 + a0 b1 + a1 b0 + a1 b1
  Store the first term in result0, the rest in result1</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - first factor of the multiplication, in split form</dd><dd><code>b</code> - second factor of the multiplication, in split form</dd>
<dt><span class="strong">Returns:</span></dt><dd>a &times; b, in split form</dd></dl>
</li>
</ul>
<a name="splitDiv(org.apache.commons.math3.dfp.Dfp[], org.apache.commons.math3.dfp.Dfp[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>splitDiv</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;splitDiv(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a,
             <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;b)</pre>
<div class="block">Divide two numbers that are split in to two pieces that are meant to be added together.
 Inverse of split multiply above:
  (a+b) / (c+d) = (a/c) + ( (bc-ad)/(c**2+cd) )</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - dividend, in split form</dd><dd><code>b</code> - divisor, in split form</dd>
<dt><span class="strong">Returns:</span></dt><dd>a / b, in split form</dd></dl>
</li>
</ul>
<a name="splitPow(org.apache.commons.math3.dfp.Dfp[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>splitPow</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;splitPow(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;base,
           int&nbsp;a)</pre>
<div class="block">Raise a split base to the a power.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>base</code> - number to raise</dd><dd><code>a</code> - power</dd>
<dt><span class="strong">Returns:</span></dt><dd>base<sup>a</sup></dd></dl>
</li>
</ul>
<a name="pow(org.apache.commons.math3.dfp.Dfp, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pow</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;pow(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;base,
      int&nbsp;a)</pre>
<div class="block">Raises base to the power a by successive squaring.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>base</code> - number to raise</dd><dd><code>a</code> - power</dd>
<dt><span class="strong">Returns:</span></dt><dd>base<sup>a</sup></dd></dl>
</li>
</ul>
<a name="exp(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exp</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;exp(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">Computes e to the given power.
 a is broken into two parts, such that a = n+m  where n is an integer.
 We use pow() to compute e<sup>n</sup> and a Taylor series to compute
 e<sup>m</sup>.  We return e*<sup>n</sup> &times; e<sup>m</sup></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - power at which e should be raised</dd>
<dt><span class="strong">Returns:</span></dt><dd>e<sup>a</sup></dd></dl>
</li>
</ul>
<a name="expInternal(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expInternal</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;expInternal(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">Computes e to the given power.
 Where -1 < a < 1.  Use the classic Taylor series.  1 + x**2/2! + x**3/3! + x**4/4!  ...</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - power at which e should be raised</dd>
<dt><span class="strong">Returns:</span></dt><dd>e<sup>a</sup></dd></dl>
</li>
</ul>
<a name="log(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>log</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;log(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">Returns the natural logarithm of a.
 a is first split into three parts such that  a = (10000^h)(2^j)k.
 ln(a) is computed by ln(a) = ln(5)*h + ln(2)*(h+j) + ln(k)
 k is in the range 2/3 < k <4/3 and is passed on to a series expansion.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which logarithm is requested</dd>
<dt><span class="strong">Returns:</span></dt><dd>log(a)</dd></dl>
</li>
</ul>
<a name="logInternal(org.apache.commons.math3.dfp.Dfp[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logInternal</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;logInternal(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a)</pre>
<div class="block">Computes the natural log of a number between 0 and 2.
  Let f(x) = ln(x),

  We know that f'(x) = 1/x, thus from Taylor's theorum we have:

           -----          n+1         n
  f(x) =   \           (-1)    (x - 1)
           /          ----------------    for 1 <= n <= infinity
           -----             n

  or
                       2        3       4
                   (x-1)   (x-1)    (x-1)
  ln(x) =  (x-1) - ----- + ------ - ------ + ...
                     2       3        4

  alternatively,

                  2    3   4
                 x    x   x
  ln(x+1) =  x - -  + - - - + ...
                 2    3   4

  This series can be used to compute ln(x), but it converges too slowly.

  If we substitute -x for x above, we get

                   2    3    4
                  x    x    x
  ln(1-x) =  -x - -  - -  - - + ...
                  2    3    4

  Note that all terms are now negative.  Because the even powered ones
  absorbed the sign.  Now, subtract the series above from the previous
  one to get ln(x+1) - ln(1-x).  Note the even terms cancel out leaving
  only the odd ones

                             3     5      7
                           2x    2x     2x
  ln(x+1) - ln(x-1) = 2x + --- + --- + ---- + ...
                            3     5      7

  By the property of logarithms that ln(a) - ln(b) = ln (a/b) we have:

                                3        5        7
      x+1           /          x        x        x          \
  ln ----- =   2 *  |  x  +   ----  +  ----  +  ---- + ...  |
      x-1           \          3        5        7          /

  But now we want to find ln(a), so we need to find the value of x
  such that a = (x+1)/(x-1).   This is easily solved to find that
  x = (a-1)/(a+1).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which logarithm is requested, in split form</dd>
<dt><span class="strong">Returns:</span></dt><dd>log(a)</dd></dl>
</li>
</ul>
<a name="pow(org.apache.commons.math3.dfp.Dfp, org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pow</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;pow(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;x,
      <a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;y)</pre>
<div class="block">Computes x to the y power.<p>

  Uses the following method:<p>

  <ol>
  <li> Set u = rint(y), v = y-u
  <li> Compute a = v * ln(x)
  <li> Compute b = rint( a/ln(2) )
  <li> Compute c = a - b*ln(2)
  <li> x<sup>y</sup> = x<sup>u</sup>  *   2<sup>b</sup> * e<sup>c</sup>
  </ol>
  if |y| > 1e8, then we compute by exp(y*ln(x))   <p>

  <b>Special Cases</b><p>
  <ul>
  <li>  if y is 0.0 or -0.0 then result is 1.0
  <li>  if y is 1.0 then result is x
  <li>  if y is NaN then result is NaN
  <li>  if x is NaN and y is not zero then result is NaN
  <li>  if |x| > 1.0 and y is +Infinity then result is +Infinity
  <li>  if |x| < 1.0 and y is -Infinity then result is +Infinity
  <li>  if |x| > 1.0 and y is -Infinity then result is +0
  <li>  if |x| < 1.0 and y is +Infinity then result is +0
  <li>  if |x| = 1.0 and y is +/-Infinity then result is NaN
  <li>  if x = +0 and y > 0 then result is +0
  <li>  if x = +Inf and y < 0 then result is +0
  <li>  if x = +0 and y < 0 then result is +Inf
  <li>  if x = +Inf and y > 0 then result is +Inf
  <li>  if x = -0 and y > 0, finite, not odd integer then result is +0
  <li>  if x = -0 and y < 0, finite, and odd integer then result is -Inf
  <li>  if x = -Inf and y > 0, finite, and odd integer then result is -Inf
  <li>  if x = -0 and y < 0, not finite odd integer then result is +Inf
  <li>  if x = -Inf and y > 0, not finite odd integer then result is +Inf
  <li>  if x < 0 and y > 0, finite, and odd integer then result is -(|x|<sup>y</sup>)
  <li>  if x < 0 and y > 0, finite, and not integer then result is NaN
  </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - base to be raised</dd><dd><code>y</code> - power to which base should be raised</dd>
<dt><span class="strong">Returns:</span></dt><dd>x<sup>y</sup></dd></dl>
</li>
</ul>
<a name="sinInternal(org.apache.commons.math3.dfp.Dfp[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sinInternal</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;sinInternal(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a)</pre>
<div class="block">Computes sin(a)  Used when 0 < a < pi/4.
 Uses the classic Taylor series.  x - x**3/3! + x**5/5!  ...</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which sine is desired, in split form</dd>
<dt><span class="strong">Returns:</span></dt><dd>sin(a)</dd></dl>
</li>
</ul>
<a name="cosInternal(org.apache.commons.math3.dfp.Dfp[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cosInternal</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;cosInternal(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>[]&nbsp;a)</pre>
<div class="block">Computes cos(a)  Used when 0 < a < pi/4.
 Uses the classic Taylor series for cosine.  1 - x**2/2! + x**4/4!  ...</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which cosine is desired, in split form</dd>
<dt><span class="strong">Returns:</span></dt><dd>cos(a)</dd></dl>
</li>
</ul>
<a name="sin(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sin</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;sin(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the sine of the argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which sine is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>sin(a)</dd></dl>
</li>
</ul>
<a name="cos(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cos</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;cos(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the cosine of the argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which cosine is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>cos(a)</dd></dl>
</li>
</ul>
<a name="tan(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tan</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;tan(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the tangent of the argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which tangent is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>tan(a)</dd></dl>
</li>
</ul>
<a name="atanInternal(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>atanInternal</h4>
<pre>protected static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;atanInternal(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the arc-tangent of the argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which arc-tangent is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>atan(a)</dd></dl>
</li>
</ul>
<a name="atan(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>atan</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;atan(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the arc tangent of the argument

  Uses the typical taylor series

  but may reduce arguments using the following identity
 tan(x+y) = (tan(x) + tan(y)) / (1 - tan(x)*tan(y))

 since tan(PI/8) = sqrt(2)-1,

 atan(x) = atan( (x - sqrt(2) + 1) / (1+x*sqrt(2) - x) + PI/8.0</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which arc-tangent is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>atan(a)</dd></dl>
</li>
</ul>
<a name="asin(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asin</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;asin(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the arc-sine of the argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which arc-sine is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>asin(a)</dd></dl>
</li>
</ul>
<a name="acos(org.apache.commons.math3.dfp.Dfp)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>acos</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;acos(<a href="../../../../../org/apache/commons/math3/dfp/Dfp.html" title="class in org.apache.commons.math3.dfp">Dfp</a>&nbsp;a)</pre>
<div class="block">computes the arc-cosine of the argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - number from which arc-cosine is desired</dd>
<dt><span class="strong">Returns:</span></dt><dd>acos(a)</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DfpMath.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/dfp/DfpField.RoundingMode.html" title="enum in org.apache.commons.math3.dfp"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/dfp/UnivariateDfpFunction.html" title="interface in org.apache.commons.math3.dfp"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/dfp/DfpMath.html" target="_top">Frames</a></li>
<li><a href="DfpMath.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
